/**
 * 分页对象
 * new Page(列表, 总条数, 当前页码, 每页条数)
 */
class Page {
  constructor(pageNum = 1, pageSize = 20, total = 0, list = []) {
    this.pageNum = pageNum;
    this.pageSize = pageSize;
    this.total = total;
    this.list = list;
    return this;
  }
  toString() {
    return 'Page对象中的数据: ' + JSON.stringify(this);
  }
}

module.exports = Page;